import { ajaxPut, ajaxUpload } from "@/http/axios/request"

export const sendCode = (data: { admin_account: string }) => {
  return ajaxUpload('/admin/login/sendCode', data)
}

export const login = (data: { admin_account: string, admin_password: string }) => {
  return ajaxUpload('/admin/login/auth', data)
}

export const codeLogin = (data: { account: string, code: string }) => {
  return ajaxUpload('/admin/login/verifyCode', data)
}

export const resetPwd = (data: { admin_id: string }) => {
  return ajaxPut('/admin/admin/resetPwd', data)
}

export const changePwd = (data: { admin_id: number, password: string, confirm_password: string }) => {
  return ajaxPut('/admin/admin/editPwd', data)
}

export const logout = () => {
    return ajaxUpload('/admin/login/logout')
}